package com.painter;

import java.awt.*;

/**
 * @code @Author:Painter
 * @code @project_name:Tetris
 * @code @class_name:Point
 * @code @system_login_name:23287
 * @code @time: 2023/5/10  22:58
 */


public class Piece {

    private int x;
    private int y;
    private Color color;


    public Piece(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public Piece(int x, int y, Color color) {
        this.x = x;
        this.y = y;
        this.color = color;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Piece{" +
                "x=" + x +
                ", y=" + y +
                ", color=" + color +
                '}';
    }
}
